/**
 * Implementation of an inversion of a 5D domain wall fermion
 * by taking a Fourier Transform and solving the system in
 * 4D slices
 */


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include "qdp.h"
#include <quda.h>

using namespace QDP;

class dwf_4d_invert
{
public:
    static void fourierTransform(multi1d<LatticeFermion> &eta, multi1d<LatticeFermion> &fteta);
    static void fourierTransformInv(multi1d<LatticeFermion> &psi, multi1d<LatticeFermion> &iftpsi);
    static void fullInversion(multi1d<LatticeFermion> &src, multi1d<LatticeFermion> &sol, multi1d<LatticeColorMatrix> &u, double M5, int dagger);
    static void domainWallFermionInvert(multi1d<LatticeFermion> &eta, multi1d<LatticeFermion> &psi, multi1d<LatticeColorMatrix> &u, double M5, int dagger);
};

